<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./load.css">
    <script>
        window.addEventListener('DOMContentLoaded',function(){
          /*  console.log('DOMContentLoaded');
           let logo = document.querySelector('#logo');
           logo.onload = function(){
            console.log('图片加载完成');
           }
           logo.addEventListener('load',function(){
             console.log('图片加载完成');
           }); */
        });
        window.addEventListener('load',function(){
           console.log('window load');
        });
        let script = document.createElement('script');
        script.src = './load.js';
        script.addEventListener('load',function(){
            console.log('script load');
        });
        document.head.appendChild(script);
       </script>
</head>
<body>
    <img onload="console.log('logo load')" id="logo" src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" />
    <script src="./load.js"/>
   <script>
       
       </script>
</body>
</html>